<!--
 * @Author: 曹曙光
 * @Date: 2023-03-22 14:55:36
 * @LastEditors: 曹曙光
 * @LastEditTime: 2023-03-22 15:02:00
 * @FilePath: \learnmoreecharts\单页面地图echarts.html
 * @Description: 
 * 
-->
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/5.4.1/echarts.min.js"></script>
</head>

<body>
    <div class="content">
        <div ref="charts" style="width: 400px; height: 400px" id="main"></div>
    </div>
    <script>
        var myechart = echarts.init(document.getElementById('main'))
        myechart.setOption({

            xAxis: {
                type: 'category',
                data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
            },
            yAxis: {
                type: 'value'
            },
            series: [
                {
                    data: [120, 200, 150, 80, 70, 110, 130],
                    type: 'bar',
                    showBackground: true,
                    backgroundStyle: {
                        color: 'rgba(180, 180, 180, 0.2)'
                    }
                }
            ]
        })

    </script>
</body>

</html>